<script setup>
// 引入全局组件如有需要
</script>

<template>
  <div id="app">
    <!-- 路由视图，显示当前路由对应的组件 -->
    <router-view v-slot="{ Component }">
      <transition name="fade" mode="out-in">
        <component :is="Component" />
      </transition>
    </router-view>
  </div>
</template>

<style>
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden; /* 只禁止水平滚动，允许垂直滚动 */
}

body {
  overflow-y: auto; /* 明确允许垂直滚动 */
}

#app {
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
}

.fade-enter-active,
.fade-leave-active {
  transition: opacity 0.3s ease;
}

.fade-enter-from,
.fade-leave-to {
  opacity: 0;
}

/* 全局样式可以在这里定义 */
body {
  font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
}
</style>
